<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="pubsub_v1beta2.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#acknowledge">acknowledge(subscription, body)</a></code></p>
<p class="firstline">Acknowledges the messages associated with the ack tokens in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.</p>
<p class="toc_element">
  <code><a href="#create">create(name, body)</a></code></p>
<p class="firstline">Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.</p>
<p class="toc_element">
  <code><a href="#delete">delete(subscription)</a></code></p>
<p class="firstline">Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.</p>
<p class="toc_element">
  <code><a href="#get">get(subscription)</a></code></p>
<p class="firstline">Gets the configuration details of a subscription.</p>
<p class="toc_element">
  <code><a href="#list">list(project, pageSize=None, pageToken=None)</a></code></p>
<p class="firstline">Lists matching subscriptions.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body)</a></code></p>
<p class="firstline">Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.</p>
<p class="toc_element">
  <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body)</a></code></p>
<p class="firstline">Modifies the PushConfig for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.</p>
<p class="toc_element">
  <code><a href="#pull">pull(subscription, body)</a></code></p>
<p class="firstline">Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="acknowledge">acknowledge(subscription, body)</code>
  <pre>Acknowledges the messages associated with the ack tokens in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.

Args:
  subscription: string, A parameter (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "ackIds": [
      "A String",
    ],
  }


Returns:
  An object of the form:

    {
  }</pre>
</div>

<div class="method">
    <code class="details" id="create">create(name, body)</code>
  <pre>Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

Args:
  name: string, A parameter (required)
  body: object, The request body. (required)
    The object takes the form of:

{
  "ackDeadlineSeconds": 42,
  "topic": "A String",
  "pushConfig": {
    "attributes": {
      "a_key": "A String",
    },
    "pushEndpoint": "A String",
  },
  "name": "A String",
}


Returns:
  An object of the form:

    {
    "ackDeadlineSeconds": 42,
    "topic": "A String",
    "pushConfig": {
      "attributes": {
        "a_key": "A String",
      },
      "pushEndpoint": "A String",
    },
    "name": "A String",
  }</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(subscription)</code>
  <pre>Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.

Args:
  subscription: string, A parameter (required)

Returns:
  An object of the form:

    {
  }</pre>
</div>

<div class="method">
    <code class="details" id="get">get(subscription)</code>
  <pre>Gets the configuration details of a subscription.

Args:
  subscription: string, A parameter (required)

Returns:
  An object of the form:

    {
    "ackDeadlineSeconds": 42,
    "topic": "A String",
    "pushConfig": {
      "attributes": {
        "a_key": "A String",
      },
      "pushEndpoint": "A String",
    },
    "name": "A String",
  }</pre>
</div>

<div class="method">
    <code class="details" id="list">list(project, pageSize=None, pageToken=None)</code>
  <pre>Lists matching subscriptions.

Args:
  project: string, A parameter (required)
  pageSize: integer, A parameter
  pageToken: string, A parameter

Returns:
  An object of the form:

    {
    "nextPageToken": "A String",
    "subscriptions": [
      {
        "ackDeadlineSeconds": 42,
        "topic": "A String",
        "pushConfig": {
          "attributes": {
            "a_key": "A String",
          },
          "pushEndpoint": "A String",
        },
        "name": "A String",
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
  <pre>Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    </pre>
</div>

<div class="method">
    <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body)</code>
  <pre>Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

Args:
  subscription: string, A parameter (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "ackDeadlineSeconds": 42,
    "ackId": "A String",
  }


Returns:
  An object of the form:

    {
  }</pre>
</div>

<div class="method">
    <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body)</code>
  <pre>Modifies the PushConfig for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.

Args:
  subscription: string, A parameter (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "pushConfig": {
      "attributes": {
        "a_key": "A String",
      },
      "pushEndpoint": "A String",
    },
  }


Returns:
  An object of the form:

    {
  }</pre>
</div>

<div class="method">
    <code class="details" id="pull">pull(subscription, body)</code>
  <pre>Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.

Args:
  subscription: string, A parameter (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "returnImmediately": True or False,
    "maxMessages": 42,
  }


Returns:
  An object of the form:

    {
    "receivedMessages": [
      {
        "ackId": "A String",
        "message": {
          "attributes": {
            "a_key": "A String",
          },
          "data": "A String",
          "messageId": "A String",
        },
      },
    ],
  }</pre>
</div>

</body></html>